<template>
  <div class="home">
    <el-container>
      <el-header style="height: 80px">
        <MyHeader></MyHeader>
      </el-header>
      <el-container class="headAndMain">
        <el-aside>
          <!-- <el-radio-group v-model="isCollapse" style="margin-bottom: 20px">
            <el-radio-button :label="false">展开</el-radio-button>
            <el-radio-button :label="true">收起</el-radio-button>
          </el-radio-group> -->
          <iconpark-icon class="changeBt" name="shouqi" @click="changeIsColl"></iconpark-icon>
          <!-- <button class="changeBt" @click="changeIsColl">《--》</button> -->
          <LeftMenu :isCollapse="isCollapse" :list="list"></LeftMenu>
        </el-aside>
        <el-main>
          <div class="main"> 
            <router-view></router-view>
          </div>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import LeftMenu from "@/components/LeftMenu";
import MyHeader from "@/components/MyHeader";
export default {
  name: "Home",
  components: {
    MyHeader,
    LeftMenu,
  },
  data() {
    return {
      isCollapse: false,
      list: [
        {
          self: {
            index: "AllDispatch",
            icon: "tiaodu",
            title: "综合调度",
            to: "/AllDispatch",
            // <iconpark-icon name="tiaodu"></iconpark-icon>
          },
          child: [
            {
              self: {
                index: "PipelineManage",
                title: "管线管理",
                to: "/PipelineManage",
              },
              child: [],
            },
            {
              self: { 
                index: "TaskManage", 
                title: "任务管理", 
                to: "/TaskManage" 
              },
              child: [],
            },
          ],
        },
        {
          self: {
            index: "WorkOrder",
            icon: "gongdan",
            title: "工单系统",
            to: "/WorkOrder",
            // <iconpark-icon name="gongdan"></iconpark-icon>
          },
          child: [
            {
              self: {
                index: "HistoryOrder",
                title: "历史工单",
                to: "/HistoryOrder",
              },
              child: [],
            },
            {
              self: { index: "OrderData", title: "工单数据", to: "/OrderData" },
              child: [],
            },
            {
              self: { index: "OrderList", title: "工单列表", to: "/OrderList" },
              child: [],
            },
          ],
        },
        {
          self: {
            index: "Guarantee",
            icon: "baozhang",
            title: "保障体系",
            to: "/Guarantee",
            // <iconpark-icon name="baozhang"></iconpark-icon>
          },
          child: [
            {
              self: {
                index: "EmergencyManage",
                title: "应急管理",
                to: "/EmergencyManage",
              },
              child: [],
            },
            {
              self: {
                index: "DutyManageme",
                title: "值班管理",
                to: "/DutyManageme",
              },
              child: [],
            },
            {
              self: {
                index: "PlanManage",
                title: "预案管理",
                to: "/PlanManage",
              },
              child: [],
            },
            {
              self: {
                index: "ExpertManage",
                title: "专家库管理",
                to: "/ExpertManage",
              },
              child: [],
            },
          ],
        },
        {
          self: {
            index: "Operational",
            icon: "yunying",
            title: "运营指挥",
            to: "/Operational",
            // <iconpark-icon name="yunying"></iconpark-icon>
          },
          child: [
            {
              self: { index: "DenManage", title: "设备管理", to: "/DenManage" },
              child: [],
            },
            {
              self: { index: "InfoQuery", title: "信息查询", to: "/InfoQuery" },
              child: [],
            },
            // {
            //   self: {
            //     index: "InfoStatistics",
            //     title: "信息查询",
            //     to: "/InfoStatistics",
            //   },
            //   child: [],
            // },
            
          ],
        },
        {
          self: {
            index: "GisMap",
            icon: "GISditu",
            title: "GIS地图",
            to: "/GisMap",
            // <iconpark-icon name="GISditu"></iconpark-icon>
          },
          child: [
            {
              self: { index: "Map", title: "地图", to: "/Map" },
              child: [],
            },
          ],
        },
        {
          self: {
            index: "GuaranteeSystem",
            icon: "baozhang",
            title: "保障体系",
            to: "/GuaranteeSystem",
          },
          child: [
            {
              self: {
                index: "Guarantee",
                title: "保障",
                to: "/Guarantee",
              },
              child: [],
            },
          ],
        },
        {
          self: {
            index: "Locus",
            icon: "guiji",
            title: "轨迹",
            to: "/Locus",
            // <iconpark-icon name="guiji"></iconpark-icon>
          },
          child: [
            {
              self: {
                index: "Locusmanage",
                title: "轨迹管理",
                to: "/Locusmanage",
              },
              child: [],
            },
            {
              self: {
                index: "Watermanage",
                title: "供水管理",
                to: "/Watermanage",
              },
              child: [],
            },
          ],
        },
        {
          self: {
            index: "Fault",
            icon: "guzhang",
            title: "故障研判",
            to: "/Fault",
            // <iconpark-icon name="guzhang"></iconpark-icon>
          },
          child: [
            {
              self: {
                index: "FaultAnalysis",
                title: "故障分析",
                to: "/FaultAnalysis",
              },
              child: [],
            },
            {
              self: {
                index: "PipThreshold",
                title: "官网阈值",
                to: "/PipThreshold",
              },
              child: [],
            },
          ],
        },
        {
          self: {
            index: "UserManage",
            icon: "yonghuguanli",
            title: "用户管理",
            to: "/UserManage",
            // <iconpark-icon name="yonghuguanli"></iconpark-icon>
          },
          child: [
            {
              self: {
                index: "UserList",
                title: "用户列表",
                to: "/UserList",
              },
              child: [],
            },
            {
              self: {
                index: "RoleManage",
                title: "角色管理",
                to: "/RoleManage",
              },
              child: [],
            },
            {
              self: {
                index: "ResourceManage",
                title: "资源管理",
                to: "/ResourceManage",
              },
              child: [],
            },
            {
              self: {
                index: "LogManage",
                title: "日志管理",
                to: "/LogManage",
              },
              child: [],
            },
          ],
        },
        {
          self: {
            index: "MonitorDev",
            title: "监控设备",
            to: "/MonitorDev",
            icon: "tiaodu",
          },
          child: [],
        },
        {
          self: {
            index: "DevSys",
            title: "设备系统",
            to: "/DevSys",
            icon: "tiaodu",
          },
          child: [
            {
              self: {
                index: "DevIndex",
                title: "首页",
                to: "/DevIndex",
              },
              child: [],
            },
            {
              self: {
                index: "DevDevManage",
                title: "设备管理",
                to: "/DevDevManage",
              },
              child: [
                {
                  self: {
                    index: "DevList",
                    title: "设备列表",
                    to: "/DevList",
                  },
                  child: [],
                },
              ],
            },
            {
              self: {
                index: "DevDataManage",
                title: "数据管理",
                to: "/DevDataManage",
              },
              child: [
                {
                  self: {
                    index: "DevNowManage",
                    title: "实时数据",
                    to: "/DevNowManage",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "DevHisManage",
                    title: "历史数据",
                    to: "/DevHisManage",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "DevDataContrast",
                    title: "数据对比",
                    to: "/DevDataContrast",
                  },
                  child: [],
                },
              ],
            },
            {
              self: {
                index: "DevWarnManage",
                title: "告警管理",
                to: "/DevWarnManage",
              },
              child: [
                {
                  self: {
                    index: "DevWarnPreview",
                    title: "告警预览",
                    to: "/DevWarnPreview",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "DevWarnNow",
                    title: "实时告警",
                    to: "/DevWarnNow",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "DevWarnHis",
                    title: "历史告警",
                    to: "/DevWarnHis",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "DevWarnSet",
                    title: "告警设置",
                    to: "/DevWarnSet",
                  },
                  child: [],
                },
              ],
            },
          ],
        },
        {
          self: {
            index: "SecondarySupply",
            title: "二供",
            to: "/SecondarySupply",
            icon: "el-icon-s-platform",
          },
          child: [
            {
              self: {
                index: "site",
                title: "站点管理",
                to: "/site",
                icon: "el-icon-s-platform",
              },
              child: [
                {
                  self: {
                    index: "pump",
                    title: "站点列表",
                    to: "/pump",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "industry",
                    title: "工业站点1",
                    to: "/industry",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "industrys",
                    title: "工业站点2",
                    to: "/industrys",
                  },
                  child: [],
                }
              ]
            },
            {
              self: {
                index: "devices",
                title: "传输设备",
                to: "/devices",
                icon: "el-icon-s-platform",
              },
              child: [
                {
                  self: {
                    index: "list",
                    title: "设备列表",
                    to: "/list",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "channel",
                    title: "通道列表",
                    to: "/channel",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "history",
                    title: "历史数据",
                    to: "/history",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "actual",
                    title: "实时数据",
                    to: "/actual",
                  },
                  child: [],
                },
                // {
                //   self: {
                //     index: "actuallist",
                //     title: "实时数据详情",
                //     to: "/actuallist",
                //   },
                //   child: [],
                // },
                {
                  self: {
                    index: "actuallists",
                    title: "实时数据详情",
                    to: "/actuallists",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "historys",
                    title: "历史告警",
                    to: "/historys",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "actuals",
                    title: "实时告警",
                    to: "/actuals",
                  },
                  child: [],
                },
              ]
            },
            {
              self: {
                index: "records",
                title: "现场设备",
                to: "/records",
                icon: "el-icon-s-platform",
              },
              child: [
                {
                  self: {
                    index: "scene",
                    title: "设备管理",
                    to: "/scene",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "scenelists",
                    title: "设备列表",
                    to: "/scenelists",
                  },
                  child: [],
                },
                // {
                //   self: {
                //     index: "scenelist",
                //     title: "设备详情",
                //     to: "/scenelist",
                //   },
                //   child: [],
                // },
                {
                  self: {
                    index: "sceneactual",
                    title: "实时数据",
                    to: "/sceneactual",
                  },
                  child: [],
                },
                {
                  self: {
                    index: "scenehistory",
                    title: "历史数据",
                    to: "/scenehistory",
                  },
                  child: [],
                }
              ],
            }
          ]
        },
      ],
    };
  },
  methods: {
    changeIsColl() {
      this.isCollapse = !this.isCollapse;
    },
  },
};
</script>

<style scoped>
::v-deep ::-webkit-scrollbar {
  display: none;
}
.home {
  width: 100%;
  height: 100vh;
  background-color: #002127;
}
::v-deep .el-header {
  padding: 0;
  margin: 0;
  height: 80px;
  background-color: #002127;
}
.el-container.is-vertical {
  height: 100%;
}
.headAndMain {
  height: calc(100% - 80px);
}
.changeBt {
  position: absolute;
  top: 26px;
  left: 180px;
}
.el-aside {
  background-color: #002127;
  width: auto !important;
}
::v-deep .el-menu {
  width: 200px;
  border: none;
}
::v-deep .el-menu--collapse {
  width: 64px;
}
.el-main {
  background-color: #0c323a;
}
.main {
  width: 100%;
  height: 100%;
  background-color: #002127;
  /* background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0)
  ); */
  background-color: #0c323a;
  border-radius: 10px;
}
</style>
